#include <iostream>
#include <string>
#include <unordered_map>
#include <set>

using namespace std;

int main()
{
    // 首先统计重复的字符
    string s1 = "abcaadefb";
    unordered_map<char, int> mp;
    set<int> st;
    string s2 = "";
    for (int i = 0; i < s1.length(); i++)
    {
        if (st.find(s1[i]) == st.end())  // 表示找不到
        {
            st.insert(s1[i]);
            s2.push_back(s1[i]);
        }
    }
    cout << s1 << endl;
    cout << s2 << endl;
    return 0;
}

